package com.ipc.app.biz;

import com.ipc.app.exception.IPCBusinessException;
import com.ipc.app.model.Information;
import com.ipc.app.model.Paginator;

/**
 * @author haijie.zhang
 * 
 */
public interface InformationBiz {

	/**
	 * @param city
	 * @return
	 */
	public Paginator<Information> getInformationByCity(String city,
			String informationType, int pageIndex);

	/**
	 * @param departureCity
	 * @param destinationCity
	 * @param pageIndex
	 * @return
	 */
	public Paginator<Information> getInformationBetweenCities(
			String departureCity, String destinationCity,
			String informationType, int pageIndex);

	/**
	 * @param informationId
	 * @return
	 */
	public Information getInformationDetail(String informationId);

	/**
	 * @param x
	 * @param y
	 * @param pageIndex
	 * @return
	 */
	public Paginator<Information> getRoundInformation(String x, String y,
			String informationType, int pageIndex);

	/**
	 * 由出发地及目的地查询
	 * 
	 * @param dep_x
	 * @param dep_y
	 * @param des_x
	 * @param dex_y
	 * @param pageIndex
	 * @return
	 */
	public Paginator<Information> getInformationByDepAndDes(String dep_x,
			String dep_y, String des_x, String dex_y, String informationType,
			int pageIndex);

	/**
	 * 获取用户发布信息
	 * 
	 * @param userID
	 * @param pagetIndex
	 * @return
	 */
	public Paginator<Information> getInformationByUser(String userID,
			String informationType, int pageIndex);

	/**
	 * 信息发布
	 * 
	 * @param information
	 */
	public void informationRelease(Information information)
			throws IPCBusinessException;

	/**
	 * 设置失效信息
	 */
	public void setInformationExpired();
}
